package com.example.handle;

import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import com.event.binlog.iface.IBinlogRowEventHandle;
import com.event.common.model.BinglogAddEvent;
import com.event.common.model.BinglogDelEvent;
import com.event.common.model.BinglogUpdateEvent;
@Slf4j
@Component
public class BinlogRowEventHandle implements IBinlogRowEventHandle {
    @Override
    public void handle(BinglogAddEvent event) {
        log.info("新增数据：{}", JSONObject.toJSONString(event));
    }

    @Override
    public void handle(BinglogDelEvent event) {
        log.info("删除数据：{}", JSONObject.toJSONString(event));
    }

    @Override
    public void handle(BinglogUpdateEvent event) {
        log.info("更新数据：{}", JSONObject.toJSONString(event));
    }
}
